<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <title>首页 </title>
    <script src="/jquery/jquery-3.2.1.min.js"></script>
    <script src="/layer/layer.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <style>
        #sd i{
            display: none;
        }
        .layui-this{
            border: 0;
            background-color: #009688;
        }
    </style>


</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">后台管理</div>
        <!-- 头部区域 -->
        <ul class="layui-nav layui-layout-left">
            <?php echo $__env->make('admin.template.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    <?php echo e($user_realname); ?>

                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="">退了</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域 -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
            <?php echo $__env->make('admin.template.nav_left', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <?php $__env->startSection('content'); ?>
        <?php echo $__env->yieldSection(); ?>
    </div>
</div>


<script type="text/javascript" src="/layui/layui.js"></script>
<script>
    layui.use('element', function(){
        var element = layui.element;
        var active = {
            tabAdd: function(url,id,name) {
                element.tabAdd('demo', {
                    title: name,
                    //content: '<iframe data-frameid="'+id+'" scrolling="auto" frameborder="0" src="'+url+'" style="width:100%;height:99%;"></iframe>',
                    content: name,
                    id: id
                })
                //CustomRightClick(id);
                FrameWH();
            },
            tabChange: function(id) {
                element.tabChange('demo', id);
            },
            tabDelete: function (id) {
                element.tabDelete("demo", id);
            }
            , tabDeleteAll: function (ids) {
                $.each(ids, function (i,item) {
                    element.tabDelete("demo", item);
                })
            }
        };
        $('.layui-nav-child a').on('click', function() {
            var dataid = $(this);
            if ($(".layui-tab-title li[lay-id]").length <= 0) {
                active.tabAdd(dataid.attr("url"), dataid.attr("id"),dataid.attr("name"));
            } else {
                var isData = false;
                $.each($(".layui-tab-title li[lay-id]"), function () {
                    if ($(this).attr("lay-id") == dataid.attr("id")) {
                        isData = true;
                    }
                })
                if (isData == false) {
                    active.tabAdd(dataid.attr("url"), dataid.attr("id"),dataid.attr("name"));
                }
            }
            active.tabChange(dataid.attr("id"));
        });
        function FrameWH() {
            var h = $(window).height() -41- 10 - 60 -10-44 -10;
            $("iframe").css("height",h+"px");
        }
        $(window).resize(function () {
            FrameWH();
        })
    });
    $(function () {
        var h = $(window).height() -41- 10 - 60 -10-44 -10;
        $("iframe").css("height",h+"px");
    })


</script>
</body>
</html>